Dev Console Aliases - #3841
Draft
jameszhang244 wants to merge 19 commits into
Draft
Conversation
Contributor
size-limit report 📦
|
Contributor
Storybook PreviewBuilt from commit |
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 17, 2026 21:08
eddc41b to
4036f75
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 17, 2026 21:36
1f2c995 to
892007b
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 19, 2026 16:18
7b37e6a to
163d1ab
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 20, 2026 20:12
e5da7bc to
21fb8e7
Compare
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 25, 2026 17:10
91de652 to
a35139b
Compare
added 14 commits
August 25, 2026 13:11
jameszhang244
force-pushed
the
jzhang/dev-console-aliases
branch
from
August 25, 2026 17:11
a35139b to
8d16795
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
@osdk/aliases, a new package holding the alias runtime, and a browser-safe entry point so Developer Console apps can read installer-supplied configuration.Why
Custom aliases let an app author declare env-var-style config that a Marketplace installer fills in at install time. Two problems with hosting that in
@osdk/functions:@osdk/functionspeer-depends on@osdk/client, so a browser app reading a JSON file inherited a client version floor. This is not theoretical: it failednpm installin a Developer Console app's build withERESOLVE.@osdk/aliaseshas no dependencies on@osdk/clientor@osdk/functions, so neither problem can recur by construction.Public API
Node code (Functions) keeps using the filesystem runtime, unchanged:
Entry points:
../experimental./nodeThe browser API sits behind
experimentalso the import path states its stability at every call site, matching@osdk/client,@osdk/react, and@osdk/react-components.Resolution behavior
initAliases()fetches once, caches, and then servescustom()synchronously. Browsers have no synchronous network read, which is why an explicit init exists rather than matching Functions' fully synchronous shape.Two files can supply values:
.palantir/deployment.config.jsonpublic/resources.jsonCallers do not choose. The deployment config is tried first and the declaration file is used only when it appears absent, meaning a 404 or a 200 carrying an HTML document (single-page-app hosts rewrite unknown paths to
index.html). Any other failure throws instead of falling back, because on an installed site both files are served and treating an error as absence would silently serve the author's defaults in place of the installer's values. Absence detection is a heuristic and is documented as one: a proxy or authentication page can also be a 200 with markup.Compatibility
@osdk/functionsre-exports the Node runtime through a local facade atsrc/aliases/index.ts, so its publicAliasesnamespace is unchanged. The facade is a local module with explicit named re-exports for two API Extractor limitations, both documented in the file: it cannot processexport * as nsfrom an external package, and it rejects a namespace whose target usesexport *.etc/functions.report.api.mdis updated to reflect that the namespace members now resolve from@osdk/aliases/node.Testing
transpileTypesis listed separately becausetypecheckruns with--emitDeclarationOnly falseand so does not exercise--isolatedDeclarations; a declaration-emit error can pass typecheck and still fail the build.Verified end to end against a Foundry stack:
public/resources.json, deployed the site, packaged it as a Marketplace product, and installed it with overrides. The running site reads the installer's values rather than the declared defaults.Not yet verified: packaging an application that declares no aliases.